<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>育苗地块信息添加</title>
</head>
<body>
    <div class="pt-5  pl-20 pr-20 pb-20">
        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />

            <input type="hidden" id="dataneedtouser" name="dataneedtouser" value="1" /><!--是否要包含通用数据必归属处理-->
            <input type="hidden" id="finfotypename" name="finfotypename" value="生产关联地块" />
            <input type="hidden" id="ftaskid" name="ftaskid" value="" />
            <input type="hidden" id="finfotype" name="finfotype" value="1" />
            <input type="hidden" id="finfobytype1" name="finfobytype1" value="1" />
            <div class="row cl" style="margin-top: 0px;">
                <label class="form-label col-2">地块信息：</label>
                <div class="formControls col-2  layui-form">
                    <select name="finfoid" id='finfoid' lay-filter="layseltasksctype" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                    <input type="hidden" id="finfofv1" name="finfofv1" value="" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">使用面积：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="finfonv1" id="finfonv1" placeholder="使用的面积" value="0" datatype="/^-?[1-9]+(\.\d+)?$|^-?0(\.\d+)?$|^-?[1-9]+[0-9]*(\.\d+)?$/" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">说明：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="finfofv2" id="finfofv2" placeholder="说明" value="" />
                </div>
                <div class="col-1"></div>
            </div>

            <div class="row cl">
                <div class="col-6 col-offset-4">

                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交</button>&nbsp;&nbsp;
				<button class="btn btn-secondary radius" type="button" id="btn_reset">重置</button>&nbsp;&nbsp;
 
                    <button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>
                </div>
            </div>
            <div class="row cl">
                <div class="col-10" id="divforhcrfbutton">
                </div>
            </div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../js/hcrainwf.js"></script>
    <!--   <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>-->

    <script type="text/javascript" src="../lib/datatables/1.10.0/jtable.js"></script>
    <script type="text/javascript" src="../js/hcui_list.js"></script>

    <script type="text/javascript">
        HcUiAuloadInfoAuto = false;//将自动加载，设置为false（禁用自动加载）
        spsetBaseNoBt("hsc_task_info", "id", "hsc_task_info as T", "*", "#tablelist", "hsc_task_info", "生产任务管理", "hsc_task_info");
        var uiform = null;
        //当前关联对象信息
        var inoutusernameselObj = [];
        
        
       
        //加载处理
        function loadin() {
            layui.use(['form'], function () {
                uiform = layui.form();
                //地块信息
                hcdoselbyPost("id,fv1 as name,nv1", "yw_baseinfo", "type=2 and maintype=2 and databranchid=" + HCUser.HCUorg, "", "", "id",
                       function (data) {
                           SetSelectWithArrayIdName("#finfoid", data);
                           inoutusernameselObj = data;//JSON.parse(data);
                           if (uiform) uiform.render('select');
                       });
                //因为这个慢，所在加载要从这个开始
                loadInfoById(aumid, function (data) {
                    loadback(data);
                });
                uiform.on('select(layseltasksctype)', function (data) {
                    $('#finfofv1').val($("#finfoid").find("option:selected").text());
                    var objget = hcgetJsonObjById(inoutusernameselObj, data.value);
                    $('#finfonv1').val(objget.nv1);
                });

            });

            if (getUrlParam("action") == "add") {
                $("#ftaskid").val(getUrlParam("maintype"));
            }
        }
        function loadback(data) {
            uiform.render();//这个不能去掉,坑啊
        }
    </script>

</body>
</html>
